class routeService {
    private baseUrl: string;
    private wilddogUrl: string;
    //轨迹定位
    private entityUrl: string;
    private historyUrl: string;

    constructor() {
        this.baseUrl = "/";
        this.wilddogUrl = "https://tmsystem-web-dev.wilddogio.com/";
        this.entityUrl = "http://api.map.baidu.com/trace/v2/entity/list";
        this.historyUrl = "http://api.map.baidu.com/trace/v2/track/gethistory";
    }

    getUrl(url: string, value?: any) {
        let result = Mustache.render(this.baseUrl + url, value);
        return result;
    }

    getBaseUrl() {
        return this.baseUrl;
    }

    getWilddogUrl() {
        return this.wilddogUrl;
    }

    getEntityUrl(url: string, value: string) {
        let result = Mustache.render(this.entityUrl + url, value);
        return result;
    }

    getHistoryUrl(url: string, value: string) {
        let result = Mustache.render(this.historyUrl + url, value);
        return result;
    }

     
}
///**
//* Config
//*/
//var moduleName = 'angularUtils.routeService';
//var DEFAULT_ID = '__default';

///**
// * Module
// */
//var module;
//try {
//    module = angular.module(moduleName);
//} catch (err) {
//    // named module does not exist, so create one
//    module = angular.module(moduleName, []);
//}
app.service("routeService", routeService);